import { createRouter, createWebHistory } from 'vue-router';
import Login from '../components/user/login.vue';
import Register from '../components/user/register.vue';
import Home from '@/components/home/home.vue';
import VideoCard from '../components/video/videoCard.vue';

const routes = [
  { path: '/', component: Login }, // 默认显示视频列表
  { path: '/login', component: Login },
  { path: '/register',   name: 'register', component: Register },
  { path: '/home',   name: 'home', component: Home },
  { path: '/videoCard', component: VideoCard }, // 视频列表

];

const router = createRouter({
  history: createWebHistory(),
  routes,
});

export default router;
